package com.wans.apis.lottery.client;

import com.wans.apis.lottery.fallback.LotterySSQClientFallback;
import com.wans.common.result.ResponseResult;
import com.wans.model.lottery.ssq.dos.SSQUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "realm-ssq", path = "/lottery/ssq/user", contextId = "lotterySSQUserClient", fallback = LotterySSQClientFallback.class)
public interface LotterySSQUserClient {

    /**
     * 获取数据列表 - 未进行计算奖金的数据记录
     *
     * @return 数据列表
     */
    @GetMapping("/update")
    ResponseResult<List<SSQUser>> listUserRecords();


    /**
     * 修改某一条记录
     *
     * @param userRecord 修改记录
     * @return 修改结果
     */
    @PutMapping("/update")
    ResponseResult<Void> updateRecord(@RequestBody SSQUser userRecord);

}
